﻿using System;
using System.ComponentModel;
using GalaSoft.MvvmLight;
using IssueVision.Data.Web;

namespace IssueVision.Common
{
    public interface IAdminIssueVisionModel : INotifyPropertyChanged, ICleanup
    {
        void GetIssueTypesAsync();
        event EventHandler<EntityResultsArgs<IssueType>> GetIssueTypesComplete;
        void GetResolutionsAsync();
        event EventHandler<EntityResultsArgs<Resolution>> GetResolutionsComplete;
        void GetStatusesAsync();
        event EventHandler<EntityResultsArgs<Status>> GetStatusesComplete;
        void GetSubStatusesAsync();
        event EventHandler<EntityResultsArgs<SubStatus>> GetSubStatusesComplete;
        void GetUsersAsync();
        event EventHandler<EntityResultsArgs<User>> GetUsersComplete;
        void GetIssueHistoryByIssueIDAsync(long issueID);
        event EventHandler<EntityResultsArgs<IssueHistory>> GetIssueHistoryByIssueIDComplete;

        User AddNewUser();
        void RemoveUser(User user);

        void SaveChangesAsync();
        event EventHandler<SubmitOperationEventArgs> SaveChangesComplete;
        void RejectChanges();

        Boolean HasChanges { get; }
        Boolean IsBusy { get; }
    }
}
